// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by google-apis-code-generator 1.5.1
//     C# generator version: 1.22.0
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

/**
 * \brief
 *   Cloud SQL Administration API Version v1beta4
 *
 * \section ApiInfo API Version Information
 *    <table>
 *      <tr><th>API
 *          <td><a href='https://cloud.google.com/sql/docs/reference/latest'>Cloud SQL Administration API</a>
 *      <tr><th>API Version<td>v1beta4
 *      <tr><th>API Rev<td>20170217 (778)
 *      <tr><th>API Docs
 *          <td><a href='https://cloud.google.com/sql/docs/reference/latest'>
 *              https://cloud.google.com/sql/docs/reference/latest</a>
 *      <tr><th>Discovery Name<td>sqladmin
 *    </table>
 *
 * \section ForMoreInfo For More Information
 *
 * The complete API documentation for using Cloud SQL Administration API can be found at
 * <a href='https://cloud.google.com/sql/docs/reference/latest'>https://cloud.google.com/sql/docs/reference/latest</a>.
 *
 * For more information about the Google APIs Client Library for .NET, see
 * <a href='https://developers.google.com/api-client-library/dotnet/get_started'>
 * https://developers.google.com/api-client-library/dotnet/get_started</a>
 */

namespace Google.Apis.SQLAdmin.v1beta4
{
    /// <summary>The SQLAdmin Service.</summary>
    public class SQLAdminService : Google.Apis.Services.BaseClientService
    {
        /// <summary>The API version.</summary>
        public const string Version = "v1beta4";

        /// <summary>The discovery version used to generate this service.</summary>
        public static Google.Apis.Discovery.DiscoveryVersion DiscoveryVersionUsed =
            Google.Apis.Discovery.DiscoveryVersion.Version_1_0;

        /// <summary>Constructs a new service.</summary>
        public SQLAdminService() :
            this(new Google.Apis.Services.BaseClientService.Initializer()) {}

        /// <summary>Constructs a new service.</summary>
        /// <param name="initializer">The service initializer.</param>
        public SQLAdminService(Google.Apis.Services.BaseClientService.Initializer initializer)
            : base(initializer)
        {
            backupRuns = new BackupRunsResource(this);
            databases = new DatabasesResource(this);
            flags = new FlagsResource(this);
            instances = new InstancesResource(this);
            operations = new OperationsResource(this);
            sslCerts = new SslCertsResource(this);
            tiers = new TiersResource(this);
            users = new UsersResource(this);
        }

        /// <summary>Gets the service supported features.</summary>
        public override System.Collections.Generic.IList<string> Features
        {
            get { return new string[0]; }
        }

        /// <summary>Gets the service name.</summary>
        public override string Name
        {
            get { return "sqladmin"; }
        }

        /// <summary>Gets the service base URI.</summary>
        public override string BaseUri
        {
            get { return "https://www.googleapis.com/sql/v1beta4/"; }
        }

        /// <summary>Gets the service base path.</summary>
        public override string BasePath
        {
            get { return "sql/v1beta4/"; }
        }

        /// <summary>Available OAuth 2.0 scopes for use with the Cloud SQL Administration API.</summary>
        public class Scope
        {
            /// <summary>View and manage your data across Google Cloud Platform services</summary>
            public static string CloudPlatform = "https://www.googleapis.com/auth/cloud-platform";

            /// <summary>Manage your Google SQL Service instances</summary>
            public static string SqlserviceAdmin = "https://www.googleapis.com/auth/sqlservice.admin";

        }



        private readonly BackupRunsResource backupRuns;

        /// <summary>Gets the BackupRuns resource.</summary>
        public virtual BackupRunsResource BackupRuns
        {
            get { return backupRuns; }
        }

        private readonly DatabasesResource databases;

        /// <summary>Gets the Databases resource.</summary>
        public virtual DatabasesResource Databases
        {
            get { return databases; }
        }

        private readonly FlagsResource flags;

        /// <summary>Gets the Flags resource.</summary>
        public virtual FlagsResource Flags
        {
            get { return flags; }
        }

        private readonly InstancesResource instances;

        /// <summary>Gets the Instances resource.</summary>
        public virtual InstancesResource Instances
        {
            get { return instances; }
        }

        private readonly OperationsResource operations;

        /// <summary>Gets the Operations resource.</summary>
        public virtual OperationsResource Operations
        {
            get { return operations; }
        }

        private readonly SslCertsResource sslCerts;

        /// <summary>Gets the SslCerts resource.</summary>
        public virtual SslCertsResource SslCerts
        {
            get { return sslCerts; }
        }

        private readonly TiersResource tiers;

        /// <summary>Gets the Tiers resource.</summary>
        public virtual TiersResource Tiers
        {
            get { return tiers; }
        }

        private readonly UsersResource users;

        /// <summary>Gets the Users resource.</summary>
        public virtual UsersResource Users
        {
            get { return users; }
        }
    }

    ///<summary>A base abstract class for SQLAdmin requests.</summary>
    public abstract class SQLAdminBaseServiceRequest<TResponse> : Google.Apis.Requests.ClientServiceRequest<TResponse>
    {
        ///<summary>Constructs a new SQLAdminBaseServiceRequest instance.</summary>
        protected SQLAdminBaseServiceRequest(Google.Apis.Services.IClientService service)
            : base(service)
        {
        }

        /// <summary>Data format for the response.</summary>
        /// [default: json]
        [Google.Apis.Util.RequestParameterAttribute("alt", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<AltEnum> Alt { get; set; }

        /// <summary>Data format for the response.</summary>
        public enum AltEnum
        {
            /// <summary>Responses with Content-Type of application/json</summary>
            [Google.Apis.Util.StringValueAttribute("json")]
            Json,
        }

        /// <summary>Selector specifying which fields to include in a partial response.</summary>
        [Google.Apis.Util.RequestParameterAttribute("fields", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Fields { get; set; }

        /// <summary>API key. Your API key identifies your project and provides you with API access, quota, and reports.
        /// Required unless you provide an OAuth 2.0 token.</summary>
        [Google.Apis.Util.RequestParameterAttribute("key", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Key { get; set; }

        /// <summary>OAuth 2.0 token for the current user.</summary>
        [Google.Apis.Util.RequestParameterAttribute("oauth_token", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string OauthToken { get; set; }

        /// <summary>Returns response with indentations and line breaks.</summary>
        /// [default: true]
        [Google.Apis.Util.RequestParameterAttribute("prettyPrint", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<bool> PrettyPrint { get; set; }

        /// <summary>Available to use for quota purposes for server-side applications. Can be any arbitrary string
        /// assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.</summary>
        [Google.Apis.Util.RequestParameterAttribute("quotaUser", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string QuotaUser { get; set; }

        /// <summary>IP address of the site where the request originates. Use this if you want to enforce per-user
        /// limits.</summary>
        [Google.Apis.Util.RequestParameterAttribute("userIp", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string UserIp { get; set; }

        /// <summary>Initializes SQLAdmin parameter list.</summary>
        protected override void InitParameters()
        {
            base.InitParameters();

            RequestParameters.Add(
                "alt", new Google.Apis.Discovery.Parameter
                {
                    Name = "alt",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "json",
                    Pattern = null,
                });
            RequestParameters.Add(
                "fields", new Google.Apis.Discovery.Parameter
                {
                    Name = "fields",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "key", new Google.Apis.Discovery.Parameter
                {
                    Name = "key",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "oauth_token", new Google.Apis.Discovery.Parameter
                {
                    Name = "oauth_token",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "prettyPrint", new Google.Apis.Discovery.Parameter
                {
                    Name = "prettyPrint",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "true",
                    Pattern = null,
                });
            RequestParameters.Add(
                "quotaUser", new Google.Apis.Discovery.Parameter
                {
                    Name = "quotaUser",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "userIp", new Google.Apis.Discovery.Parameter
                {
                    Name = "userIp",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
        }
    }

    /// <summary>The "backupRuns" collection of methods.</summary>
    public class BackupRunsResource
    {
        private const string Resource = "backupRuns";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public BackupRunsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Deletes the backup taken by a backup run.</summary>
        /// <param name="project">Project ID of the project that contains the instance.</param>
        /// <param
        /// name="instance">Cloud SQL instance ID. This does not include the project ID.</param>
        /// <param name="id">The ID
        /// of the Backup Run to delete. To find a Backup Run ID, use the list method.</param>
        public virtual DeleteRequest Delete(string project, string instance, long id)
        {
            return new DeleteRequest(service, project, instance, id);
        }

        /// <summary>Deletes the backup taken by a backup run.</summary>
        public class DeleteRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.Operation>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, string project, string instance, long id)
                : base(service)
            {
                Project = project;
                Instance = instance;
                Id = id;
                InitParameters();
            }


            /// <summary>Project ID of the project that contains the instance.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>Cloud SQL instance ID. This does not include the project ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("instance", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Instance { get; private set; }

            /// <summary>The ID of the Backup Run to delete. To find a Backup Run ID, use the list method.</summary>
            [Google.Apis.Util.RequestParameterAttribute("id", Google.Apis.Util.RequestParameterType.Path)]
            public virtual long Id { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{project}/instances/{instance}/backupRuns/{id}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "instance", new Google.Apis.Discovery.Parameter
                    {
                        Name = "instance",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "id", new Google.Apis.Discovery.Parameter
                    {
                        Name = "id",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieves a resource containing information about a backup run.</summary>
        /// <param name="project">Project ID of the project that contains the instance.</param>
        /// <param
        /// name="instance">Cloud SQL instance ID. This does not include the project ID.</param>
        /// <param name="id">The ID
        /// of this Backup Run.</param>
        public virtual GetRequest Get(string project, string instance, long id)
        {
            return new GetRequest(service, project, instance, id);
        }

        /// <summary>Retrieves a resource containing information about a backup run.</summary>
        public class GetRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.BackupRun>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string project, string instance, long id)
                : base(service)
            {
                Project = project;
                Instance = instance;
                Id = id;
                InitParameters();
            }


            /// <summary>Project ID of the project that contains the instance.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>Cloud SQL instance ID. This does not include the project ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("instance", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Instance { get; private set; }

            /// <summary>The ID of this Backup Run.</summary>
            [Google.Apis.Util.RequestParameterAttribute("id", Google.Apis.Util.RequestParameterType.Path)]
            public virtual long Id { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{project}/instances/{instance}/backupRuns/{id}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "instance", new Google.Apis.Discovery.Parameter
                    {
                        Name = "instance",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "id", new Google.Apis.Discovery.Parameter
                    {
                        Name = "id",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Creates a new backup run on demand. This method is applicable only to Second Generation
        /// instances.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="project">Project ID of the project that contains the instance.</param>
        /// <param
        /// name="instance">Cloud SQL instance ID. This does not include the project ID.</param>
        public virtual InsertRequest Insert(Google.Apis.SQLAdmin.v1beta4.Data.BackupRun body, string project, string instance)
        {
            return new InsertRequest(service, body, project, instance);
        }

        /// <summary>Creates a new backup run on demand. This method is applicable only to Second Generation
        /// instances.</summary>
        public class InsertRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.Operation>
        {
            /// <summary>Constructs a new Insert request.</summary>
            public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.SQLAdmin.v1beta4.Data.BackupRun body, string project, string instance)
                : base(service)
            {
                Project = project;
                Instance = instance;
                Body = body;
                InitParameters();
            }


            /// <summary>Project ID of the project that contains the instance.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>Cloud SQL instance ID. This does not include the project ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("instance", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Instance { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.SQLAdmin.v1beta4.Data.BackupRun Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "insert"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{project}/instances/{instance}/backupRuns"; }
            }

            /// <summary>Initializes Insert parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "instance", new Google.Apis.Discovery.Parameter
                    {
                        Name = "instance",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Lists all backup runs associated with a given instance and configuration in the reverse
        /// chronological order of the enqueued time.</summary>
        /// <param name="project">Project ID of the project that contains the instance.</param>
        /// <param
        /// name="instance">Cloud SQL instance ID. This does not include the project ID.</param>
        public virtual ListRequest List(string project, string instance)
        {
            return new ListRequest(service, project, instance);
        }

        /// <summary>Lists all backup runs associated with a given instance and configuration in the reverse
        /// chronological order of the enqueued time.</summary>
        public class ListRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.BackupRunsListResponse>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string project, string instance)
                : base(service)
            {
                Project = project;
                Instance = instance;
                InitParameters();
            }


            /// <summary>Project ID of the project that contains the instance.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>Cloud SQL instance ID. This does not include the project ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("instance", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Instance { get; private set; }

            /// <summary>Maximum number of backup runs per response.</summary>
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<int> MaxResults { get; set; }

            /// <summary>A previously-returned page token representing part of the larger set of results to
            /// view.</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{project}/instances/{instance}/backupRuns"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "instance", new Google.Apis.Discovery.Parameter
                    {
                        Name = "instance",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "databases" collection of methods.</summary>
    public class DatabasesResource
    {
        private const string Resource = "databases";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public DatabasesResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Deletes a database from a Cloud SQL instance.</summary>
        /// <param name="project">Project ID of the project that contains the instance.</param>
        /// <param
        /// name="instance">Database instance ID. This does not include the project ID.</param>
        /// <param
        /// name="database">Name of the database to be deleted in the instance.</param>
        public virtual DeleteRequest Delete(string project, string instance, string database)
        {
            return new DeleteRequest(service, project, instance, database);
        }

        /// <summary>Deletes a database from a Cloud SQL instance.</summary>
        public class DeleteRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.Operation>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, string project, string instance, string database)
                : base(service)
            {
                Project = project;
                Instance = instance;
                Database = database;
                InitParameters();
            }


            /// <summary>Project ID of the project that contains the instance.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>Database instance ID. This does not include the project ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("instance", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Instance { get; private set; }

            /// <summary>Name of the database to be deleted in the instance.</summary>
            [Google.Apis.Util.RequestParameterAttribute("database", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Database { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{project}/instances/{instance}/databases/{database}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "instance", new Google.Apis.Discovery.Parameter
                    {
                        Name = "instance",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "database", new Google.Apis.Discovery.Parameter
                    {
                        Name = "database",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieves a resource containing information about a database inside a Cloud SQL instance.</summary>
        /// <param name="project">Project ID of the project that contains the instance.</param>
        /// <param
        /// name="instance">Database instance ID. This does not include the project ID.</param>
        /// <param
        /// name="database">Name of the database in the instance.</param>
        public virtual GetRequest Get(string project, string instance, string database)
        {
            return new GetRequest(service, project, instance, database);
        }

        /// <summary>Retrieves a resource containing information about a database inside a Cloud SQL instance.</summary>
        public class GetRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.Database>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string project, string instance, string database)
                : base(service)
            {
                Project = project;
                Instance = instance;
                Database = database;
                InitParameters();
            }


            /// <summary>Project ID of the project that contains the instance.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>Database instance ID. This does not include the project ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("instance", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Instance { get; private set; }

            /// <summary>Name of the database in the instance.</summary>
            [Google.Apis.Util.RequestParameterAttribute("database", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Database { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{project}/instances/{instance}/databases/{database}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "instance", new Google.Apis.Discovery.Parameter
                    {
                        Name = "instance",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "database", new Google.Apis.Discovery.Parameter
                    {
                        Name = "database",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Inserts a resource containing information about a database inside a Cloud SQL instance.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="project">Project ID of the project that contains the instance.</param>
        /// <param
        /// name="instance">Database instance ID. This does not include the project ID.</param>
        public virtual InsertRequest Insert(Google.Apis.SQLAdmin.v1beta4.Data.Database body, string project, string instance)
        {
            return new InsertRequest(service, body, project, instance);
        }

        /// <summary>Inserts a resource containing information about a database inside a Cloud SQL instance.</summary>
        public class InsertRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.Operation>
        {
            /// <summary>Constructs a new Insert request.</summary>
            public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.SQLAdmin.v1beta4.Data.Database body, string project, string instance)
                : base(service)
            {
                Project = project;
                Instance = instance;
                Body = body;
                InitParameters();
            }


            /// <summary>Project ID of the project that contains the instance.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>Database instance ID. This does not include the project ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("instance", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Instance { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.SQLAdmin.v1beta4.Data.Database Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "insert"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{project}/instances/{instance}/databases"; }
            }

            /// <summary>Initializes Insert parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "instance", new Google.Apis.Discovery.Parameter
                    {
                        Name = "instance",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Lists databases in the specified Cloud SQL instance.</summary>
        /// <param name="project">Project ID of the project for which to list Cloud SQL instances.</param>
        /// <param
        /// name="instance">Cloud SQL instance ID. This does not include the project ID.</param>
        public virtual ListRequest List(string project, string instance)
        {
            return new ListRequest(service, project, instance);
        }

        /// <summary>Lists databases in the specified Cloud SQL instance.</summary>
        public class ListRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.DatabasesListResponse>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string project, string instance)
                : base(service)
            {
                Project = project;
                Instance = instance;
                InitParameters();
            }


            /// <summary>Project ID of the project for which to list Cloud SQL instances.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>Cloud SQL instance ID. This does not include the project ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("instance", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Instance { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{project}/instances/{instance}/databases"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "instance", new Google.Apis.Discovery.Parameter
                    {
                        Name = "instance",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates a resource containing information about a database inside a Cloud SQL instance. This method
        /// supports patch semantics.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="project">Project ID of the project that contains the instance.</param>
        /// <param
        /// name="instance">Database instance ID. This does not include the project ID.</param>
        /// <param
        /// name="database">Name of the database to be updated in the instance.</param>
        public virtual PatchRequest Patch(Google.Apis.SQLAdmin.v1beta4.Data.Database body, string project, string instance, string database)
        {
            return new PatchRequest(service, body, project, instance, database);
        }

        /// <summary>Updates a resource containing information about a database inside a Cloud SQL instance. This method
        /// supports patch semantics.</summary>
        public class PatchRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.Operation>
        {
            /// <summary>Constructs a new Patch request.</summary>
            public PatchRequest(Google.Apis.Services.IClientService service, Google.Apis.SQLAdmin.v1beta4.Data.Database body, string project, string instance, string database)
                : base(service)
            {
                Project = project;
                Instance = instance;
                Database = database;
                Body = body;
                InitParameters();
            }


            /// <summary>Project ID of the project that contains the instance.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>Database instance ID. This does not include the project ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("instance", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Instance { get; private set; }

            /// <summary>Name of the database to be updated in the instance.</summary>
            [Google.Apis.Util.RequestParameterAttribute("database", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Database { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.SQLAdmin.v1beta4.Data.Database Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "patch"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PATCH"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{project}/instances/{instance}/databases/{database}"; }
            }

            /// <summary>Initializes Patch parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "instance", new Google.Apis.Discovery.Parameter
                    {
                        Name = "instance",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "database", new Google.Apis.Discovery.Parameter
                    {
                        Name = "database",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates a resource containing information about a database inside a Cloud SQL instance.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="project">Project ID of the project that contains the instance.</param>
        /// <param
        /// name="instance">Database instance ID. This does not include the project ID.</param>
        /// <param
        /// name="database">Name of the database to be updated in the instance.</param>
        public virtual UpdateRequest Update(Google.Apis.SQLAdmin.v1beta4.Data.Database body, string project, string instance, string database)
        {
            return new UpdateRequest(service, body, project, instance, database);
        }

        /// <summary>Updates a resource containing information about a database inside a Cloud SQL instance.</summary>
        public class UpdateRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.Operation>
        {
            /// <summary>Constructs a new Update request.</summary>
            public UpdateRequest(Google.Apis.Services.IClientService service, Google.Apis.SQLAdmin.v1beta4.Data.Database body, string project, string instance, string database)
                : base(service)
            {
                Project = project;
                Instance = instance;
                Database = database;
                Body = body;
                InitParameters();
            }


            /// <summary>Project ID of the project that contains the instance.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>Database instance ID. This does not include the project ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("instance", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Instance { get; private set; }

            /// <summary>Name of the database to be updated in the instance.</summary>
            [Google.Apis.Util.RequestParameterAttribute("database", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Database { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.SQLAdmin.v1beta4.Data.Database Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "update"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PUT"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{project}/instances/{instance}/databases/{database}"; }
            }

            /// <summary>Initializes Update parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "instance", new Google.Apis.Discovery.Parameter
                    {
                        Name = "instance",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "database", new Google.Apis.Discovery.Parameter
                    {
                        Name = "database",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "flags" collection of methods.</summary>
    public class FlagsResource
    {
        private const string Resource = "flags";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public FlagsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>List all available database flags for Google Cloud SQL instances.</summary>
        public virtual ListRequest List()
        {
            return new ListRequest(service);
        }

        /// <summary>List all available database flags for Google Cloud SQL instances.</summary>
        public class ListRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.FlagsListResponse>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service)
                : base(service)
            {
                InitParameters();
            }


            /// <summary>Database version for flag retrieval. Flags are specific to the database version.</summary>
            [Google.Apis.Util.RequestParameterAttribute("databaseVersion", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string DatabaseVersion { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "flags"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "databaseVersion", new Google.Apis.Discovery.Parameter
                    {
                        Name = "databaseVersion",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "instances" collection of methods.</summary>
    public class InstancesResource
    {
        private const string Resource = "instances";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public InstancesResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Creates a Cloud SQL instance as a clone of the source instance. The API is not ready for Second
        /// Generation instances yet.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="project">Project ID of the source as well as the clone Cloud SQL instance.</param>
        /// <param
        /// name="instance">The ID of the Cloud SQL instance to be cloned (source). This does not include the project
        /// ID.</param>
        public virtual CloneRequest Clone(Google.Apis.SQLAdmin.v1beta4.Data.InstancesCloneRequest body, string project, string instance)
        {
            return new CloneRequest(service, body, project, instance);
        }

        /// <summary>Creates a Cloud SQL instance as a clone of the source instance. The API is not ready for Second
        /// Generation instances yet.</summary>
        public class CloneRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.Operation>
        {
            /// <summary>Constructs a new Clone request.</summary>
            public CloneRequest(Google.Apis.Services.IClientService service, Google.Apis.SQLAdmin.v1beta4.Data.InstancesCloneRequest body, string project, string instance)
                : base(service)
            {
                Project = project;
                Instance = instance;
                Body = body;
                InitParameters();
            }


            /// <summary>Project ID of the source as well as the clone Cloud SQL instance.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>The ID of the Cloud SQL instance to be cloned (source). This does not include the project
            /// ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("instance", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Instance { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.SQLAdmin.v1beta4.Data.InstancesCloneRequest Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "clone"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{project}/instances/{instance}/clone"; }
            }

            /// <summary>Initializes Clone parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "instance", new Google.Apis.Discovery.Parameter
                    {
                        Name = "instance",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Deletes a Cloud SQL instance.</summary>
        /// <param name="project">Project ID of the project that contains the instance to be deleted.</param>
        /// <param
        /// name="instance">Cloud SQL instance ID. This does not include the project ID.</param>
        public virtual DeleteRequest Delete(string project, string instance)
        {
            return new DeleteRequest(service, project, instance);
        }

        /// <summary>Deletes a Cloud SQL instance.</summary>
        public class DeleteRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.Operation>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, string project, string instance)
                : base(service)
            {
                Project = project;
                Instance = instance;
                InitParameters();
            }


            /// <summary>Project ID of the project that contains the instance to be deleted.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>Cloud SQL instance ID. This does not include the project ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("instance", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Instance { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{project}/instances/{instance}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "instance", new Google.Apis.Discovery.Parameter
                    {
                        Name = "instance",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Exports data from a Cloud SQL instance to a Google Cloud Storage bucket as a MySQL dump
        /// file.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="project">Project ID of the project that contains the instance to be exported.</param>
        /// <param
        /// name="instance">Cloud SQL instance ID. This does not include the project ID.</param>
        public virtual ExportRequest Export(Google.Apis.SQLAdmin.v1beta4.Data.InstancesExportRequest body, string project, string instance)
        {
            return new ExportRequest(service, body, project, instance);
        }

        /// <summary>Exports data from a Cloud SQL instance to a Google Cloud Storage bucket as a MySQL dump
        /// file.</summary>
        public class ExportRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.Operation>
        {
            /// <summary>Constructs a new Export request.</summary>
            public ExportRequest(Google.Apis.Services.IClientService service, Google.Apis.SQLAdmin.v1beta4.Data.InstancesExportRequest body, string project, string instance)
                : base(service)
            {
                Project = project;
                Instance = instance;
                Body = body;
                InitParameters();
            }


            /// <summary>Project ID of the project that contains the instance to be exported.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>Cloud SQL instance ID. This does not include the project ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("instance", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Instance { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.SQLAdmin.v1beta4.Data.InstancesExportRequest Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "export"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{project}/instances/{instance}/export"; }
            }

            /// <summary>Initializes Export parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "instance", new Google.Apis.Discovery.Parameter
                    {
                        Name = "instance",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Failover the instance to its failover replica instance.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="project">ID of the project that contains the read replica.</param>
        /// <param name="instance">Cloud
        /// SQL instance ID. This does not include the project ID.</param>
        public virtual FailoverRequest Failover(Google.Apis.SQLAdmin.v1beta4.Data.InstancesFailoverRequest body, string project, string instance)
        {
            return new FailoverRequest(service, body, project, instance);
        }

        /// <summary>Failover the instance to its failover replica instance.</summary>
        public class FailoverRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.Operation>
        {
            /// <summary>Constructs a new Failover request.</summary>
            public FailoverRequest(Google.Apis.Services.IClientService service, Google.Apis.SQLAdmin.v1beta4.Data.InstancesFailoverRequest body, string project, string instance)
                : base(service)
            {
                Project = project;
                Instance = instance;
                Body = body;
                InitParameters();
            }


            /// <summary>ID of the project that contains the read replica.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>Cloud SQL instance ID. This does not include the project ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("instance", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Instance { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.SQLAdmin.v1beta4.Data.InstancesFailoverRequest Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "failover"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{project}/instances/{instance}/failover"; }
            }

            /// <summary>Initializes Failover parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "instance", new Google.Apis.Discovery.Parameter
                    {
                        Name = "instance",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieves a resource containing information about a Cloud SQL instance.</summary>
        /// <param name="project">Project ID of the project that contains the instance.</param>
        /// <param
        /// name="instance">Database instance ID. This does not include the project ID.</param>
        public virtual GetRequest Get(string project, string instance)
        {
            return new GetRequest(service, project, instance);
        }

        /// <summary>Retrieves a resource containing information about a Cloud SQL instance.</summary>
        public class GetRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.DatabaseInstance>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string project, string instance)
                : base(service)
            {
                Project = project;
                Instance = instance;
                InitParameters();
            }


            /// <summary>Project ID of the project that contains the instance.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>Database instance ID. This does not include the project ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("instance", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Instance { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{project}/instances/{instance}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "instance", new Google.Apis.Discovery.Parameter
                    {
                        Name = "instance",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Imports data into a Cloud SQL instance from a MySQL dump file in Google Cloud Storage.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="project">Project ID of the project that contains the instance.</param>
        /// <param
        /// name="instance">Cloud SQL instance ID. This does not include the project ID.</param>
        public virtual ImportRequest Import(Google.Apis.SQLAdmin.v1beta4.Data.InstancesImportRequest body, string project, string instance)
        {
            return new ImportRequest(service, body, project, instance);
        }

        /// <summary>Imports data into a Cloud SQL instance from a MySQL dump file in Google Cloud Storage.</summary>
        public class ImportRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.Operation>
        {
            /// <summary>Constructs a new Import request.</summary>
            public ImportRequest(Google.Apis.Services.IClientService service, Google.Apis.SQLAdmin.v1beta4.Data.InstancesImportRequest body, string project, string instance)
                : base(service)
            {
                Project = project;
                Instance = instance;
                Body = body;
                InitParameters();
            }


            /// <summary>Project ID of the project that contains the instance.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>Cloud SQL instance ID. This does not include the project ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("instance", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Instance { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.SQLAdmin.v1beta4.Data.InstancesImportRequest Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "import"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{project}/instances/{instance}/import"; }
            }

            /// <summary>Initializes Import parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "instance", new Google.Apis.Discovery.Parameter
                    {
                        Name = "instance",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Creates a new Cloud SQL instance.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="project">Project ID of the project to which the newly created Cloud SQL instances should
        /// belong.</param>
        public virtual InsertRequest Insert(Google.Apis.SQLAdmin.v1beta4.Data.DatabaseInstance body, string project)
        {
            return new InsertRequest(service, body, project);
        }

        /// <summary>Creates a new Cloud SQL instance.</summary>
        public class InsertRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.Operation>
        {
            /// <summary>Constructs a new Insert request.</summary>
            public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.SQLAdmin.v1beta4.Data.DatabaseInstance body, string project)
                : base(service)
            {
                Project = project;
                Body = body;
                InitParameters();
            }


            /// <summary>Project ID of the project to which the newly created Cloud SQL instances should
            /// belong.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.SQLAdmin.v1beta4.Data.DatabaseInstance Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "insert"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{project}/instances"; }
            }

            /// <summary>Initializes Insert parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Lists instances under a given project in the alphabetical order of the instance name.</summary>
        /// <param name="project">Project ID of the project for which to list Cloud SQL instances.</param>
        public virtual ListRequest List(string project)
        {
            return new ListRequest(service, project);
        }

        /// <summary>Lists instances under a given project in the alphabetical order of the instance name.</summary>
        public class ListRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.InstancesListResponse>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string project)
                : base(service)
            {
                Project = project;
                InitParameters();
            }


            /// <summary>Project ID of the project for which to list Cloud SQL instances.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>A filter expression for filtering listed instances.</summary>
            [Google.Apis.Util.RequestParameterAttribute("filter", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Filter { get; set; }

            /// <summary>The maximum number of results to return per response.</summary>
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<long> MaxResults { get; set; }

            /// <summary>A previously-returned page token representing part of the larger set of results to
            /// view.</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{project}/instances"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "filter", new Google.Apis.Discovery.Parameter
                    {
                        Name = "filter",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates settings of a Cloud SQL instance. Caution: This is not a partial update, so you must
        /// include values for all the settings that you want to retain. For partial updates, use patch.. This method
        /// supports patch semantics.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="project">Project ID of the project that contains the instance.</param>
        /// <param
        /// name="instance">Cloud SQL instance ID. This does not include the project ID.</param>
        public virtual PatchRequest Patch(Google.Apis.SQLAdmin.v1beta4.Data.DatabaseInstance body, string project, string instance)
        {
            return new PatchRequest(service, body, project, instance);
        }

        /// <summary>Updates settings of a Cloud SQL instance. Caution: This is not a partial update, so you must
        /// include values for all the settings that you want to retain. For partial updates, use patch.. This method
        /// supports patch semantics.</summary>
        public class PatchRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.Operation>
        {
            /// <summary>Constructs a new Patch request.</summary>
            public PatchRequest(Google.Apis.Services.IClientService service, Google.Apis.SQLAdmin.v1beta4.Data.DatabaseInstance body, string project, string instance)
                : base(service)
            {
                Project = project;
                Instance = instance;
                Body = body;
                InitParameters();
            }


            /// <summary>Project ID of the project that contains the instance.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>Cloud SQL instance ID. This does not include the project ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("instance", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Instance { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.SQLAdmin.v1beta4.Data.DatabaseInstance Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "patch"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PATCH"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{project}/instances/{instance}"; }
            }

            /// <summary>Initializes Patch parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "instance", new Google.Apis.Discovery.Parameter
                    {
                        Name = "instance",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Promotes the read replica instance to be a stand-alone Cloud SQL instance.</summary>
        /// <param name="project">ID of the project that contains the read replica.</param>
        /// <param name="instance">Cloud
        /// SQL read replica instance name.</param>
        public virtual PromoteReplicaRequest PromoteReplica(string project, string instance)
        {
            return new PromoteReplicaRequest(service, project, instance);
        }

        /// <summary>Promotes the read replica instance to be a stand-alone Cloud SQL instance.</summary>
        public class PromoteReplicaRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.Operation>
        {
            /// <summary>Constructs a new PromoteReplica request.</summary>
            public PromoteReplicaRequest(Google.Apis.Services.IClientService service, string project, string instance)
                : base(service)
            {
                Project = project;
                Instance = instance;
                InitParameters();
            }


            /// <summary>ID of the project that contains the read replica.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>Cloud SQL read replica instance name.</summary>
            [Google.Apis.Util.RequestParameterAttribute("instance", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Instance { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "promoteReplica"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{project}/instances/{instance}/promoteReplica"; }
            }

            /// <summary>Initializes PromoteReplica parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "instance", new Google.Apis.Discovery.Parameter
                    {
                        Name = "instance",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Deletes all client certificates and generates a new server SSL certificate for the instance. The
        /// changes will not take effect until the instance is restarted. Existing instances without a server
        /// certificate will need to call this once to set a server certificate.</summary>
        /// <param name="project">Project ID of the project that contains the instance.</param>
        /// <param
        /// name="instance">Cloud SQL instance ID. This does not include the project ID.</param>
        public virtual ResetSslConfigRequest ResetSslConfig(string project, string instance)
        {
            return new ResetSslConfigRequest(service, project, instance);
        }

        /// <summary>Deletes all client certificates and generates a new server SSL certificate for the instance. The
        /// changes will not take effect until the instance is restarted. Existing instances without a server
        /// certificate will need to call this once to set a server certificate.</summary>
        public class ResetSslConfigRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.Operation>
        {
            /// <summary>Constructs a new ResetSslConfig request.</summary>
            public ResetSslConfigRequest(Google.Apis.Services.IClientService service, string project, string instance)
                : base(service)
            {
                Project = project;
                Instance = instance;
                InitParameters();
            }


            /// <summary>Project ID of the project that contains the instance.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>Cloud SQL instance ID. This does not include the project ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("instance", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Instance { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "resetSslConfig"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{project}/instances/{instance}/resetSslConfig"; }
            }

            /// <summary>Initializes ResetSslConfig parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "instance", new Google.Apis.Discovery.Parameter
                    {
                        Name = "instance",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Restarts a Cloud SQL instance.</summary>
        /// <param name="project">Project ID of the project that contains the instance to be restarted.</param>
        /// <param
        /// name="instance">Cloud SQL instance ID. This does not include the project ID.</param>
        public virtual RestartRequest Restart(string project, string instance)
        {
            return new RestartRequest(service, project, instance);
        }

        /// <summary>Restarts a Cloud SQL instance.</summary>
        public class RestartRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.Operation>
        {
            /// <summary>Constructs a new Restart request.</summary>
            public RestartRequest(Google.Apis.Services.IClientService service, string project, string instance)
                : base(service)
            {
                Project = project;
                Instance = instance;
                InitParameters();
            }


            /// <summary>Project ID of the project that contains the instance to be restarted.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>Cloud SQL instance ID. This does not include the project ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("instance", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Instance { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "restart"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{project}/instances/{instance}/restart"; }
            }

            /// <summary>Initializes Restart parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "instance", new Google.Apis.Discovery.Parameter
                    {
                        Name = "instance",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Restores a backup of a Cloud SQL instance.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="project">Project ID of the project that contains the instance.</param>
        /// <param
        /// name="instance">Cloud SQL instance ID. This does not include the project ID.</param>
        public virtual RestoreBackupRequest RestoreBackup(Google.Apis.SQLAdmin.v1beta4.Data.InstancesRestoreBackupRequest body, string project, string instance)
        {
            return new RestoreBackupRequest(service, body, project, instance);
        }

        /// <summary>Restores a backup of a Cloud SQL instance.</summary>
        public class RestoreBackupRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.Operation>
        {
            /// <summary>Constructs a new RestoreBackup request.</summary>
            public RestoreBackupRequest(Google.Apis.Services.IClientService service, Google.Apis.SQLAdmin.v1beta4.Data.InstancesRestoreBackupRequest body, string project, string instance)
                : base(service)
            {
                Project = project;
                Instance = instance;
                Body = body;
                InitParameters();
            }


            /// <summary>Project ID of the project that contains the instance.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>Cloud SQL instance ID. This does not include the project ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("instance", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Instance { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.SQLAdmin.v1beta4.Data.InstancesRestoreBackupRequest Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "restoreBackup"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{project}/instances/{instance}/restoreBackup"; }
            }

            /// <summary>Initializes RestoreBackup parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "instance", new Google.Apis.Discovery.Parameter
                    {
                        Name = "instance",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Starts the replication in the read replica instance.</summary>
        /// <param name="project">ID of the project that contains the read replica.</param>
        /// <param name="instance">Cloud
        /// SQL read replica instance name.</param>
        public virtual StartReplicaRequest StartReplica(string project, string instance)
        {
            return new StartReplicaRequest(service, project, instance);
        }

        /// <summary>Starts the replication in the read replica instance.</summary>
        public class StartReplicaRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.Operation>
        {
            /// <summary>Constructs a new StartReplica request.</summary>
            public StartReplicaRequest(Google.Apis.Services.IClientService service, string project, string instance)
                : base(service)
            {
                Project = project;
                Instance = instance;
                InitParameters();
            }


            /// <summary>ID of the project that contains the read replica.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>Cloud SQL read replica instance name.</summary>
            [Google.Apis.Util.RequestParameterAttribute("instance", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Instance { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "startReplica"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{project}/instances/{instance}/startReplica"; }
            }

            /// <summary>Initializes StartReplica parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "instance", new Google.Apis.Discovery.Parameter
                    {
                        Name = "instance",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Stops the replication in the read replica instance.</summary>
        /// <param name="project">ID of the project that contains the read replica.</param>
        /// <param name="instance">Cloud
        /// SQL read replica instance name.</param>
        public virtual StopReplicaRequest StopReplica(string project, string instance)
        {
            return new StopReplicaRequest(service, project, instance);
        }

        /// <summary>Stops the replication in the read replica instance.</summary>
        public class StopReplicaRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.Operation>
        {
            /// <summary>Constructs a new StopReplica request.</summary>
            public StopReplicaRequest(Google.Apis.Services.IClientService service, string project, string instance)
                : base(service)
            {
                Project = project;
                Instance = instance;
                InitParameters();
            }


            /// <summary>ID of the project that contains the read replica.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>Cloud SQL read replica instance name.</summary>
            [Google.Apis.Util.RequestParameterAttribute("instance", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Instance { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "stopReplica"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{project}/instances/{instance}/stopReplica"; }
            }

            /// <summary>Initializes StopReplica parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "instance", new Google.Apis.Discovery.Parameter
                    {
                        Name = "instance",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Truncate MySQL general and slow query log tables</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="project">Project ID of the Cloud SQL project.</param>
        /// <param name="instance">Cloud SQL instance
        /// ID. This does not include the project ID.</param>
        public virtual TruncateLogRequest TruncateLog(Google.Apis.SQLAdmin.v1beta4.Data.InstancesTruncateLogRequest body, string project, string instance)
        {
            return new TruncateLogRequest(service, body, project, instance);
        }

        /// <summary>Truncate MySQL general and slow query log tables</summary>
        public class TruncateLogRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.Operation>
        {
            /// <summary>Constructs a new TruncateLog request.</summary>
            public TruncateLogRequest(Google.Apis.Services.IClientService service, Google.Apis.SQLAdmin.v1beta4.Data.InstancesTruncateLogRequest body, string project, string instance)
                : base(service)
            {
                Project = project;
                Instance = instance;
                Body = body;
                InitParameters();
            }


            /// <summary>Project ID of the Cloud SQL project.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>Cloud SQL instance ID. This does not include the project ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("instance", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Instance { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.SQLAdmin.v1beta4.Data.InstancesTruncateLogRequest Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "truncateLog"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{project}/instances/{instance}/truncateLog"; }
            }

            /// <summary>Initializes TruncateLog parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "instance", new Google.Apis.Discovery.Parameter
                    {
                        Name = "instance",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates settings of a Cloud SQL instance. Caution: This is not a partial update, so you must
        /// include values for all the settings that you want to retain. For partial updates, use patch.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="project">Project ID of the project that contains the instance.</param>
        /// <param
        /// name="instance">Cloud SQL instance ID. This does not include the project ID.</param>
        public virtual UpdateRequest Update(Google.Apis.SQLAdmin.v1beta4.Data.DatabaseInstance body, string project, string instance)
        {
            return new UpdateRequest(service, body, project, instance);
        }

        /// <summary>Updates settings of a Cloud SQL instance. Caution: This is not a partial update, so you must
        /// include values for all the settings that you want to retain. For partial updates, use patch.</summary>
        public class UpdateRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.Operation>
        {
            /// <summary>Constructs a new Update request.</summary>
            public UpdateRequest(Google.Apis.Services.IClientService service, Google.Apis.SQLAdmin.v1beta4.Data.DatabaseInstance body, string project, string instance)
                : base(service)
            {
                Project = project;
                Instance = instance;
                Body = body;
                InitParameters();
            }


            /// <summary>Project ID of the project that contains the instance.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>Cloud SQL instance ID. This does not include the project ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("instance", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Instance { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.SQLAdmin.v1beta4.Data.DatabaseInstance Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "update"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PUT"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{project}/instances/{instance}"; }
            }

            /// <summary>Initializes Update parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "instance", new Google.Apis.Discovery.Parameter
                    {
                        Name = "instance",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "operations" collection of methods.</summary>
    public class OperationsResource
    {
        private const string Resource = "operations";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public OperationsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Retrieves an instance operation that has been performed on an instance.</summary>
        /// <param name="project">Project ID of the project that contains the instance.</param>
        /// <param
        /// name="operation">Instance operation ID.</param>
        public virtual GetRequest Get(string project, string operation)
        {
            return new GetRequest(service, project, operation);
        }

        /// <summary>Retrieves an instance operation that has been performed on an instance.</summary>
        public class GetRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.Operation>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string project, string operation)
                : base(service)
            {
                Project = project;
                Operation = operation;
                InitParameters();
            }


            /// <summary>Project ID of the project that contains the instance.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>Instance operation ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("operation", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Operation { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{project}/operations/{operation}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "operation", new Google.Apis.Discovery.Parameter
                    {
                        Name = "operation",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Lists all instance operations that have been performed on the given Cloud SQL instance in the
        /// reverse chronological order of the start time.</summary>
        /// <param name="project">Project ID of the project that contains the instance.</param>
        /// <param
        /// name="instance">Cloud SQL instance ID. This does not include the project ID.</param>
        public virtual ListRequest List(string project, string instance)
        {
            return new ListRequest(service, project, instance);
        }

        /// <summary>Lists all instance operations that have been performed on the given Cloud SQL instance in the
        /// reverse chronological order of the start time.</summary>
        public class ListRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.OperationsListResponse>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string project, string instance)
                : base(service)
            {
                Project = project;
                Instance = instance;
                InitParameters();
            }


            /// <summary>Project ID of the project that contains the instance.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>Cloud SQL instance ID. This does not include the project ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("instance", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Instance { get; private set; }

            /// <summary>Maximum number of operations per response.</summary>
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<long> MaxResults { get; set; }

            /// <summary>A previously-returned page token representing part of the larger set of results to
            /// view.</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{project}/operations"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "instance", new Google.Apis.Discovery.Parameter
                    {
                        Name = "instance",
                        IsRequired = true,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "sslCerts" collection of methods.</summary>
    public class SslCertsResource
    {
        private const string Resource = "sslCerts";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public SslCertsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Generates a short-lived X509 certificate containing the provided public key and signed by a private
        /// key specific to the target instance. Users may use the certificate to authenticate as themselves when
        /// connecting to the database.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="project">Project ID of the Cloud SQL project.</param>
        /// <param name="instance">Cloud SQL instance
        /// ID. This does not include the project ID.</param>
        public virtual CreateEphemeralRequest CreateEphemeral(Google.Apis.SQLAdmin.v1beta4.Data.SslCertsCreateEphemeralRequest body, string project, string instance)
        {
            return new CreateEphemeralRequest(service, body, project, instance);
        }

        /// <summary>Generates a short-lived X509 certificate containing the provided public key and signed by a private
        /// key specific to the target instance. Users may use the certificate to authenticate as themselves when
        /// connecting to the database.</summary>
        public class CreateEphemeralRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.SslCert>
        {
            /// <summary>Constructs a new CreateEphemeral request.</summary>
            public CreateEphemeralRequest(Google.Apis.Services.IClientService service, Google.Apis.SQLAdmin.v1beta4.Data.SslCertsCreateEphemeralRequest body, string project, string instance)
                : base(service)
            {
                Project = project;
                Instance = instance;
                Body = body;
                InitParameters();
            }


            /// <summary>Project ID of the Cloud SQL project.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>Cloud SQL instance ID. This does not include the project ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("instance", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Instance { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.SQLAdmin.v1beta4.Data.SslCertsCreateEphemeralRequest Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "createEphemeral"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{project}/instances/{instance}/createEphemeral"; }
            }

            /// <summary>Initializes CreateEphemeral parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "instance", new Google.Apis.Discovery.Parameter
                    {
                        Name = "instance",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Deletes the SSL certificate. The change will not take effect until the instance is
        /// restarted.</summary>
        /// <param name="project">Project ID of the project that contains the instance to be deleted.</param>
        /// <param
        /// name="instance">Cloud SQL instance ID. This does not include the project ID.</param>
        /// <param
        /// name="sha1Fingerprint">Sha1 FingerPrint.</param>
        public virtual DeleteRequest Delete(string project, string instance, string sha1Fingerprint)
        {
            return new DeleteRequest(service, project, instance, sha1Fingerprint);
        }

        /// <summary>Deletes the SSL certificate. The change will not take effect until the instance is
        /// restarted.</summary>
        public class DeleteRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.Operation>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, string project, string instance, string sha1Fingerprint)
                : base(service)
            {
                Project = project;
                Instance = instance;
                Sha1Fingerprint = sha1Fingerprint;
                InitParameters();
            }


            /// <summary>Project ID of the project that contains the instance to be deleted.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>Cloud SQL instance ID. This does not include the project ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("instance", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Instance { get; private set; }

            /// <summary>Sha1 FingerPrint.</summary>
            [Google.Apis.Util.RequestParameterAttribute("sha1Fingerprint", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Sha1Fingerprint { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "instance", new Google.Apis.Discovery.Parameter
                    {
                        Name = "instance",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "sha1Fingerprint", new Google.Apis.Discovery.Parameter
                    {
                        Name = "sha1Fingerprint",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieves a particular SSL certificate. Does not include the private key (required for usage). The
        /// private key must be saved from the response to initial creation.</summary>
        /// <param name="project">Project ID of the project that contains the instance.</param>
        /// <param
        /// name="instance">Cloud SQL instance ID. This does not include the project ID.</param>
        /// <param
        /// name="sha1Fingerprint">Sha1 FingerPrint.</param>
        public virtual GetRequest Get(string project, string instance, string sha1Fingerprint)
        {
            return new GetRequest(service, project, instance, sha1Fingerprint);
        }

        /// <summary>Retrieves a particular SSL certificate. Does not include the private key (required for usage). The
        /// private key must be saved from the response to initial creation.</summary>
        public class GetRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.SslCert>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string project, string instance, string sha1Fingerprint)
                : base(service)
            {
                Project = project;
                Instance = instance;
                Sha1Fingerprint = sha1Fingerprint;
                InitParameters();
            }


            /// <summary>Project ID of the project that contains the instance.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>Cloud SQL instance ID. This does not include the project ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("instance", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Instance { get; private set; }

            /// <summary>Sha1 FingerPrint.</summary>
            [Google.Apis.Util.RequestParameterAttribute("sha1Fingerprint", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Sha1Fingerprint { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "instance", new Google.Apis.Discovery.Parameter
                    {
                        Name = "instance",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "sha1Fingerprint", new Google.Apis.Discovery.Parameter
                    {
                        Name = "sha1Fingerprint",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Creates an SSL certificate and returns it along with the private key and server certificate
        /// authority. The new certificate will not be usable until the instance is restarted.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="project">Project ID of the project to which the newly created Cloud SQL instances should
        /// belong.</param>
        /// <param name="instance">Cloud SQL instance ID. This does not include the project
        /// ID.</param>
        public virtual InsertRequest Insert(Google.Apis.SQLAdmin.v1beta4.Data.SslCertsInsertRequest body, string project, string instance)
        {
            return new InsertRequest(service, body, project, instance);
        }

        /// <summary>Creates an SSL certificate and returns it along with the private key and server certificate
        /// authority. The new certificate will not be usable until the instance is restarted.</summary>
        public class InsertRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.SslCertsInsertResponse>
        {
            /// <summary>Constructs a new Insert request.</summary>
            public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.SQLAdmin.v1beta4.Data.SslCertsInsertRequest body, string project, string instance)
                : base(service)
            {
                Project = project;
                Instance = instance;
                Body = body;
                InitParameters();
            }


            /// <summary>Project ID of the project to which the newly created Cloud SQL instances should
            /// belong.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>Cloud SQL instance ID. This does not include the project ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("instance", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Instance { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.SQLAdmin.v1beta4.Data.SslCertsInsertRequest Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "insert"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{project}/instances/{instance}/sslCerts"; }
            }

            /// <summary>Initializes Insert parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "instance", new Google.Apis.Discovery.Parameter
                    {
                        Name = "instance",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Lists all of the current SSL certificates for the instance.</summary>
        /// <param name="project">Project ID of the project for which to list Cloud SQL instances.</param>
        /// <param
        /// name="instance">Cloud SQL instance ID. This does not include the project ID.</param>
        public virtual ListRequest List(string project, string instance)
        {
            return new ListRequest(service, project, instance);
        }

        /// <summary>Lists all of the current SSL certificates for the instance.</summary>
        public class ListRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.SslCertsListResponse>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string project, string instance)
                : base(service)
            {
                Project = project;
                Instance = instance;
                InitParameters();
            }


            /// <summary>Project ID of the project for which to list Cloud SQL instances.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>Cloud SQL instance ID. This does not include the project ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("instance", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Instance { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{project}/instances/{instance}/sslCerts"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "instance", new Google.Apis.Discovery.Parameter
                    {
                        Name = "instance",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "tiers" collection of methods.</summary>
    public class TiersResource
    {
        private const string Resource = "tiers";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public TiersResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Lists all available service tiers for Google Cloud SQL, for example D1, D2. For related
        /// information, see Pricing.</summary>
        /// <param name="project">Project ID of the project for which to list tiers.</param>
        public virtual ListRequest List(string project)
        {
            return new ListRequest(service, project);
        }

        /// <summary>Lists all available service tiers for Google Cloud SQL, for example D1, D2. For related
        /// information, see Pricing.</summary>
        public class ListRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.TiersListResponse>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string project)
                : base(service)
            {
                Project = project;
                InitParameters();
            }


            /// <summary>Project ID of the project for which to list tiers.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{project}/tiers"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "users" collection of methods.</summary>
    public class UsersResource
    {
        private const string Resource = "users";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public UsersResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Deletes a user from a Cloud SQL instance.</summary>
        /// <param name="project">Project ID of the project that contains the instance.</param>
        /// <param
        /// name="instance">Database instance ID. This does not include the project ID.</param>
        /// <param name="host">Host
        /// of the user in the instance.</param>
        /// <param name="name">Name of the user in the instance.</param>
        public virtual DeleteRequest Delete(string project, string instance, string host, string name)
        {
            return new DeleteRequest(service, project, instance, host, name);
        }

        /// <summary>Deletes a user from a Cloud SQL instance.</summary>
        public class DeleteRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.Operation>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, string project, string instance, string host, string name)
                : base(service)
            {
                Project = project;
                Instance = instance;
                Host = host;
                Name = name;
                InitParameters();
            }


            /// <summary>Project ID of the project that contains the instance.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>Database instance ID. This does not include the project ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("instance", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Instance { get; private set; }

            /// <summary>Host of the user in the instance.</summary>
            [Google.Apis.Util.RequestParameterAttribute("host", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Host { get; private set; }

            /// <summary>Name of the user in the instance.</summary>
            [Google.Apis.Util.RequestParameterAttribute("name", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Name { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{project}/instances/{instance}/users"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "instance", new Google.Apis.Discovery.Parameter
                    {
                        Name = "instance",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "host", new Google.Apis.Discovery.Parameter
                    {
                        Name = "host",
                        IsRequired = true,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "name", new Google.Apis.Discovery.Parameter
                    {
                        Name = "name",
                        IsRequired = true,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Creates a new user in a Cloud SQL instance.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="project">Project ID of the project that contains the instance.</param>
        /// <param
        /// name="instance">Database instance ID. This does not include the project ID.</param>
        public virtual InsertRequest Insert(Google.Apis.SQLAdmin.v1beta4.Data.User body, string project, string instance)
        {
            return new InsertRequest(service, body, project, instance);
        }

        /// <summary>Creates a new user in a Cloud SQL instance.</summary>
        public class InsertRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.Operation>
        {
            /// <summary>Constructs a new Insert request.</summary>
            public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.SQLAdmin.v1beta4.Data.User body, string project, string instance)
                : base(service)
            {
                Project = project;
                Instance = instance;
                Body = body;
                InitParameters();
            }


            /// <summary>Project ID of the project that contains the instance.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>Database instance ID. This does not include the project ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("instance", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Instance { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.SQLAdmin.v1beta4.Data.User Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "insert"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{project}/instances/{instance}/users"; }
            }

            /// <summary>Initializes Insert parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "instance", new Google.Apis.Discovery.Parameter
                    {
                        Name = "instance",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Lists users in the specified Cloud SQL instance.</summary>
        /// <param name="project">Project ID of the project that contains the instance.</param>
        /// <param
        /// name="instance">Database instance ID. This does not include the project ID.</param>
        public virtual ListRequest List(string project, string instance)
        {
            return new ListRequest(service, project, instance);
        }

        /// <summary>Lists users in the specified Cloud SQL instance.</summary>
        public class ListRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.UsersListResponse>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string project, string instance)
                : base(service)
            {
                Project = project;
                Instance = instance;
                InitParameters();
            }


            /// <summary>Project ID of the project that contains the instance.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>Database instance ID. This does not include the project ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("instance", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Instance { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{project}/instances/{instance}/users"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "instance", new Google.Apis.Discovery.Parameter
                    {
                        Name = "instance",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates an existing user in a Cloud SQL instance.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="project">Project ID of the project that contains the instance.</param>
        /// <param
        /// name="instance">Database instance ID. This does not include the project ID.</param>
        /// <param name="host">Host
        /// of the user in the instance.</param>
        /// <param name="name">Name of the user in the instance.</param>
        public virtual UpdateRequest Update(Google.Apis.SQLAdmin.v1beta4.Data.User body, string project, string instance, string host, string name)
        {
            return new UpdateRequest(service, body, project, instance, host, name);
        }

        /// <summary>Updates an existing user in a Cloud SQL instance.</summary>
        public class UpdateRequest : SQLAdminBaseServiceRequest<Google.Apis.SQLAdmin.v1beta4.Data.Operation>
        {
            /// <summary>Constructs a new Update request.</summary>
            public UpdateRequest(Google.Apis.Services.IClientService service, Google.Apis.SQLAdmin.v1beta4.Data.User body, string project, string instance, string host, string name)
                : base(service)
            {
                Project = project;
                Instance = instance;
                Host = host;
                Name = name;
                Body = body;
                InitParameters();
            }


            /// <summary>Project ID of the project that contains the instance.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>Database instance ID. This does not include the project ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("instance", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Instance { get; private set; }

            /// <summary>Host of the user in the instance.</summary>
            [Google.Apis.Util.RequestParameterAttribute("host", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Host { get; private set; }

            /// <summary>Name of the user in the instance.</summary>
            [Google.Apis.Util.RequestParameterAttribute("name", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Name { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.SQLAdmin.v1beta4.Data.User Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "update"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PUT"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{project}/instances/{instance}/users"; }
            }

            /// <summary>Initializes Update parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "instance", new Google.Apis.Discovery.Parameter
                    {
                        Name = "instance",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "host", new Google.Apis.Discovery.Parameter
                    {
                        Name = "host",
                        IsRequired = true,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "name", new Google.Apis.Discovery.Parameter
                    {
                        Name = "name",
                        IsRequired = true,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }
}

namespace Google.Apis.SQLAdmin.v1beta4.Data
{    

    /// <summary>An entry for an Access Control list.</summary>
    public class AclEntry : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The time when this access control entry expires in RFC 3339 format, for example
        /// 2012-11-15T16:19:00.094Z.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("expirationTime")]
        public virtual string ExpirationTimeRaw { get; set; }

        /// <summary><seealso cref="System.DateTime"/> representation of <see cref="ExpirationTimeRaw"/>.</summary>
        [Newtonsoft.Json.JsonIgnore]
        public virtual System.Nullable<System.DateTime> ExpirationTime
        {
            get
            {
                return Google.Apis.Util.Utilities.GetDateTimeFromString(ExpirationTimeRaw);
            }
            set
            {
                ExpirationTimeRaw = Google.Apis.Util.Utilities.GetStringFromDateTime(value);
            }
        }

        /// <summary>This is always sql#aclEntry.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>An optional label to identify this entry.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>The whitelisted value for the access control list.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("value")]
        public virtual string Value { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Database instance backup configuration.</summary>
    public class BackupConfiguration : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as
        /// well.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("binaryLogEnabled")]
        public virtual System.Nullable<bool> BinaryLogEnabled { get; set; } 

        /// <summary>Whether this configuration is enabled.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("enabled")]
        public virtual System.Nullable<bool> Enabled { get; set; } 

        /// <summary>This is always sql#backupConfiguration.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Start time for the daily backup configuration in UTC timezone in the 24 hour format -
        /// HH:MM.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("startTime")]
        public virtual string StartTime { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>A database instance backup run resource.</summary>
    public class BackupRun : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The description of this run, only applicable to on-demand backups.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("description")]
        public virtual string Description { get; set; } 

        /// <summary>The time the backup operation completed in UTC timezone in RFC 3339 format, for example
        /// 2012-11-15T16:19:00.094Z.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("endTime")]
        public virtual string EndTimeRaw { get; set; }

        /// <summary><seealso cref="System.DateTime"/> representation of <see cref="EndTimeRaw"/>.</summary>
        [Newtonsoft.Json.JsonIgnore]
        public virtual System.Nullable<System.DateTime> EndTime
        {
            get
            {
                return Google.Apis.Util.Utilities.GetDateTimeFromString(EndTimeRaw);
            }
            set
            {
                EndTimeRaw = Google.Apis.Util.Utilities.GetStringFromDateTime(value);
            }
        }

        /// <summary>The time the run was enqueued in UTC timezone in RFC 3339 format, for example
        /// 2012-11-15T16:19:00.094Z.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("enqueuedTime")]
        public virtual string EnqueuedTimeRaw { get; set; }

        /// <summary><seealso cref="System.DateTime"/> representation of <see cref="EnqueuedTimeRaw"/>.</summary>
        [Newtonsoft.Json.JsonIgnore]
        public virtual System.Nullable<System.DateTime> EnqueuedTime
        {
            get
            {
                return Google.Apis.Util.Utilities.GetDateTimeFromString(EnqueuedTimeRaw);
            }
            set
            {
                EnqueuedTimeRaw = Google.Apis.Util.Utilities.GetStringFromDateTime(value);
            }
        }

        /// <summary>Information about why the backup operation failed. This is only present if the run has the FAILED
        /// status.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("error")]
        public virtual OperationError Error { get; set; } 

        /// <summary>A unique identifier for this backup run. Note that this is unique only within the scope of a
        /// particular Cloud SQL instance.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual System.Nullable<long> Id { get; set; } 

        /// <summary>Name of the database instance.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("instance")]
        public virtual string Instance { get; set; } 

        /// <summary>This is always sql#backupRun.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The URI of this resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("selfLink")]
        public virtual string SelfLink { get; set; } 

        /// <summary>The time the backup operation actually started in UTC timezone in RFC 3339 format, for example
        /// 2012-11-15T16:19:00.094Z.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("startTime")]
        public virtual string StartTimeRaw { get; set; }

        /// <summary><seealso cref="System.DateTime"/> representation of <see cref="StartTimeRaw"/>.</summary>
        [Newtonsoft.Json.JsonIgnore]
        public virtual System.Nullable<System.DateTime> StartTime
        {
            get
            {
                return Google.Apis.Util.Utilities.GetDateTimeFromString(StartTimeRaw);
            }
            set
            {
                StartTimeRaw = Google.Apis.Util.Utilities.GetStringFromDateTime(value);
            }
        }

        /// <summary>The status of this run.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("status")]
        public virtual string Status { get; set; } 

        /// <summary>The type of this run; can be either "AUTOMATED" or "ON_DEMAND".</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>The start time of the backup window during which this the backup was attempted in RFC 3339 format,
        /// for example 2012-11-15T16:19:00.094Z.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("windowStartTime")]
        public virtual string WindowStartTimeRaw { get; set; }

        /// <summary><seealso cref="System.DateTime"/> representation of <see cref="WindowStartTimeRaw"/>.</summary>
        [Newtonsoft.Json.JsonIgnore]
        public virtual System.Nullable<System.DateTime> WindowStartTime
        {
            get
            {
                return Google.Apis.Util.Utilities.GetDateTimeFromString(WindowStartTimeRaw);
            }
            set
            {
                WindowStartTimeRaw = Google.Apis.Util.Utilities.GetStringFromDateTime(value);
            }
        }

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Backup run list results.</summary>
    public class BackupRunsListResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>A list of backup runs in reverse chronological order of the enqueued time.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<BackupRun> Items { get; set; } 

        /// <summary>This is always sql#backupRunsList.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The continuation token, used to page through large result sets. Provide this value in a subsequent
        /// request to return the next page of results.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Binary log coordinates.</summary>
    public class BinLogCoordinates : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Name of the binary log file for a Cloud SQL instance.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("binLogFileName")]
        public virtual string BinLogFileName { get; set; } 

        /// <summary>Position (offset) within the binary log file.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("binLogPosition")]
        public virtual System.Nullable<long> BinLogPosition { get; set; } 

        /// <summary>This is always sql#binLogCoordinates.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Database instance clone context.</summary>
    public class CloneContext : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Binary log coordinates, if specified, indentify the the position up to which the source instance
        /// should be cloned. If not specified, the source instance is cloned up to the most recent binary log
        /// coordintes.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("binLogCoordinates")]
        public virtual BinLogCoordinates BinLogCoordinates { get; set; } 

        /// <summary>Name of the Cloud SQL instance to be created as a clone.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("destinationInstanceName")]
        public virtual string DestinationInstanceName { get; set; } 

        /// <summary>This is always sql#cloneContext.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>A database resource inside a Cloud SQL instance.</summary>
    public class Database : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The MySQL charset value.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("charset")]
        public virtual string Charset { get; set; } 

        /// <summary>The MySQL collation value.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("collation")]
        public virtual string Collation { get; set; } 

        /// <summary>HTTP 1.1 Entity tag for the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>The name of the Cloud SQL instance. This does not include the project ID.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("instance")]
        public virtual string Instance { get; set; } 

        /// <summary>This is always sql#database.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The name of the database in the Cloud SQL instance. This does not include the project ID or
        /// instance name.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed
        /// if applicable.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("project")]
        public virtual string Project { get; set; } 

        /// <summary>The URI of this resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("selfLink")]
        public virtual string SelfLink { get; set; } 

    }    

    /// <summary>MySQL flags for Cloud SQL instances.</summary>
    public class DatabaseFlags : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The name of the flag. These flags are passed at instance startup, so include both MySQL server
        /// options and MySQL system variables. Flags should be specified with underscores, not hyphens. For more
        /// information, see Configuring MySQL Flags in the Google Cloud SQL documentation, as well as the official
        /// MySQL documentation for server options and system variables.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>The value of the flag. Booleans should be set to on for true and off for false. This field must be
        /// omitted if the flag doesn't take a value.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("value")]
        public virtual string Value { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>A Cloud SQL instance resource.</summary>
    public class DatabaseInstance : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>FIRST_GEN: Basic Cloud SQL instance that runs in a Google-managed container. SECOND_GEN: A newer
        /// Cloud SQL backend that runs in a Compute Engine VM. EXTERNAL: A MySQL server that is not managed by
        /// Google.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("backendType")]
        public virtual string BackendType { get; set; } 

        /// <summary>Connection name of the Cloud SQL instance used in connection strings.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("connectionName")]
        public virtual string ConnectionName { get; set; } 

        /// <summary>The current disk usage of the instance in bytes. This property has been deprecated. Users should
        /// use the "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud Monitoring API instead. Please
        /// see https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ for
        /// details.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("currentDiskSize")]
        public virtual System.Nullable<long> CurrentDiskSize { get; set; } 

        /// <summary>The database engine type and version. The databaseVersion can not be changed after instance
        /// creation. Can be MYSQL_5_5, MYSQL_5_6 or MYSQL_5_7. Defaults to MYSQL_5_6. MYSQL_5_7 is applicable only to
        /// Second Generation instances.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("databaseVersion")]
        public virtual string DatabaseVersion { get; set; } 

        /// <summary>HTTP 1.1 Entity tag for the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>The name and status of the failover replica. This property is applicable only to Second Generation
        /// instances.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("failoverReplica")]
        public virtual DatabaseInstance.FailoverReplicaData FailoverReplica { get; set; } 

        /// <summary>The instance type. This can be one of the following. CLOUD_SQL_INSTANCE: A Cloud SQL instance that
        /// is not replicating from a master. ON_PREMISES_INSTANCE: An instance running on the customer's premises.
        /// READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("instanceType")]
        public virtual string InstanceType { get; set; } 

        /// <summary>The assigned IP addresses for the instance.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("ipAddresses")]
        public virtual System.Collections.Generic.IList<IpMapping> IpAddresses { get; set; } 

        /// <summary>The IPv6 address assigned to the instance. This property is applicable only to First Generation
        /// instances.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("ipv6Address")]
        public virtual string Ipv6Address { get; set; } 

        /// <summary>This is always sql#instance.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The name of the instance which will act as master in the replication setup.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("masterInstanceName")]
        public virtual string MasterInstanceName { get; set; } 

        /// <summary>The maximum disk size of the instance in bytes.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("maxDiskSize")]
        public virtual System.Nullable<long> MaxDiskSize { get; set; } 

        /// <summary>Name of the Cloud SQL instance. This does not include the project ID.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>Configuration specific to on-premises instances.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("onPremisesConfiguration")]
        public virtual OnPremisesConfiguration OnPremisesConfiguration { get; set; } 

        /// <summary>The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed
        /// if applicable.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("project")]
        public virtual string Project { get; set; } 

        /// <summary>The geographical region. Can be us-central (FIRST_GEN instances only), us-central1 (SECOND_GEN
        /// instances only), asia-east1 or europe-west1. Defaults to us-central or us-central1 depending on the instance
        /// type (First Generation or Second Generation). The region can not be changed after instance
        /// creation.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("region")]
        public virtual string Region { get; set; } 

        /// <summary>Configuration specific to read-replicas replicating from on-premises masters.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("replicaConfiguration")]
        public virtual ReplicaConfiguration ReplicaConfiguration { get; set; } 

        /// <summary>The replicas of the instance.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("replicaNames")]
        public virtual System.Collections.Generic.IList<string> ReplicaNames { get; set; } 

        /// <summary>The URI of this resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("selfLink")]
        public virtual string SelfLink { get; set; } 

        /// <summary>SSL configuration.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("serverCaCert")]
        public virtual SslCert ServerCaCert { get; set; } 

        /// <summary>The service account email address assigned to the instance. This property is applicable only to
        /// Second Generation instances.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("serviceAccountEmailAddress")]
        public virtual string ServiceAccountEmailAddress { get; set; } 

        /// <summary>The user settings.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("settings")]
        public virtual Settings Settings { get; set; } 

        /// <summary>The current serving state of the Cloud SQL instance. This can be one of the following. RUNNABLE:
        /// The instance is running, or is ready to run when accessed. SUSPENDED: The instance is not available, for
        /// example due to problems with billing. PENDING_CREATE: The instance is being created. MAINTENANCE: The
        /// instance is down for maintenance. FAILED: The instance creation failed. UNKNOWN_STATE: The state of the
        /// instance is unknown.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("state")]
        public virtual string State { get; set; } 

        /// <summary>If the instance state is SUSPENDED, the reason for the suspension.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("suspensionReason")]
        public virtual System.Collections.Generic.IList<string> SuspensionReason { get; set; } 

        

        /// <summary>The name and status of the failover replica. This property is applicable only to Second Generation
        /// instances.</summary>
        public class FailoverReplicaData
        {
            /// <summary>The availability status of the failover replica. A false status indicates that the failover
            /// replica is out of sync. The master can only failover to the falover replica when the status is
            /// true.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("available")]
            public virtual System.Nullable<bool> Available { get; set; } 

            /// <summary>The name of the failover replica. If specified at instance creation, a failover replica is
            /// created for the instance. The name doesn't include the project ID. This property is applicable only to
            /// Second Generation instances.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("name")]
            public virtual string Name { get; set; } 

        }
    }    

    /// <summary>Database list response.</summary>
    public class DatabasesListResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>List of database resources in the instance.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<Database> Items { get; set; } 

        /// <summary>This is always sql#databasesList.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Database instance export context.</summary>
    public class ExportContext : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Options for exporting data as CSV.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("csvExportOptions")]
        public virtual ExportContext.CsvExportOptionsData CsvExportOptions { get; set; } 

        /// <summary>Databases (for example, guestbook) from which the export is made. If fileType is SQL and no
        /// database is specified, all databases are exported. If fileType is CSV, you can optionally specify at most
        /// one database to export. If csvExportOptions.selectQuery also specifies the database, this field will be
        /// ignored.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("databases")]
        public virtual System.Collections.Generic.IList<string> Databases { get; set; } 

        /// <summary>The file type for the specified uri. SQL: The file contains SQL statements. CSV: The file contains
        /// CSV data.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("fileType")]
        public virtual string FileType { get; set; } 

        /// <summary>This is always sql#exportContext.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Options for exporting data as SQL statements.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("sqlExportOptions")]
        public virtual ExportContext.SqlExportOptionsData SqlExportOptions { get; set; } 

        /// <summary>The path to the file in Google Cloud Storage where the export will be stored. The URI is in the
        /// form gs://bucketName/fileName. If the file already exists, the operation fails. If fileType is SQL and the
        /// filename ends with .gz, the contents are compressed.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("uri")]
        public virtual string Uri { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
        

        /// <summary>Options for exporting data as CSV.</summary>
        public class CsvExportOptionsData
        {
            /// <summary>The select query used to extract the data.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("selectQuery")]
            public virtual string SelectQuery { get; set; } 

        }    

        /// <summary>Options for exporting data as SQL statements.</summary>
        public class SqlExportOptionsData
        {
            /// <summary>Export only schemas.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("schemaOnly")]
            public virtual System.Nullable<bool> SchemaOnly { get; set; } 

            /// <summary>Tables to export, or that were exported, from the specified database. If you specify tables,
            /// specify one and only one database.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("tables")]
            public virtual System.Collections.Generic.IList<string> Tables { get; set; } 

        }
    }    

    /// <summary>Database instance failover context.</summary>
    public class FailoverContext : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>This is always sql#failoverContext.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The current settings version of this instance. Request will be rejected if this version doesn't
        /// match the current settings version.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("settingsVersion")]
        public virtual System.Nullable<long> SettingsVersion { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>A Google Cloud SQL service flag resource.</summary>
    public class Flag : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>For STRING flags, a list of strings that the value can be set to.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("allowedStringValues")]
        public virtual System.Collections.Generic.IList<string> AllowedStringValues { get; set; } 

        /// <summary>The database version this flag applies to. Can be MYSQL_5_5, MYSQL_5_6, or MYSQL_5_7. MYSQL_5_7 is
        /// applicable only to Second Generation instances.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("appliesTo")]
        public virtual System.Collections.Generic.IList<string> AppliesTo { get; set; } 

        /// <summary>This is always sql#flag.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>For INTEGER flags, the maximum allowed value.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("maxValue")]
        public virtual System.Nullable<long> MaxValue { get; set; } 

        /// <summary>For INTEGER flags, the minimum allowed value.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("minValue")]
        public virtual System.Nullable<long> MinValue { get; set; } 

        /// <summary>This is the name of the flag. Flag names always use underscores, not hyphens, e.g.
        /// max_allowed_packet</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>Indicates whether changing this flag will trigger a database restart. Only applicable to Second
        /// Generation instances.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("requiresRestart")]
        public virtual System.Nullable<bool> RequiresRestart { get; set; } 

        /// <summary>The type of the flag. Flags are typed to being BOOLEAN, STRING, INTEGER or NONE. NONE is used for
        /// flags which do not take a value, such as skip_grant_tables.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Flags list response.</summary>
    public class FlagsListResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>List of flags.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<Flag> Items { get; set; } 

        /// <summary>This is always sql#flagsList.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Database instance import context.</summary>
    public class ImportContext : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Options for importing data as CSV.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("csvImportOptions")]
        public virtual ImportContext.CsvImportOptionsData CsvImportOptions { get; set; } 

        /// <summary>The database (for example, guestbook) to which the import is made. If fileType is SQL and no
        /// database is specified, it is assumed that the database is specified in the file to be imported. If fileType
        /// is CSV, it must be specified.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("database")]
        public virtual string Database { get; set; } 

        /// <summary>The file type for the specified uri. SQL: The file contains SQL statements. CSV: The file contains
        /// CSV data.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("fileType")]
        public virtual string FileType { get; set; } 

        /// <summary>This is always sql#importContext.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>A path to the file in Google Cloud Storage from which the import is made. The URI is in the form
        /// gs://bucketName/fileName. Compressed gzip files (.gz) are supported when fileType is SQL.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("uri")]
        public virtual string Uri { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
        

        /// <summary>Options for importing data as CSV.</summary>
        public class CsvImportOptionsData
        {
            /// <summary>The columns to which CSV data is imported. If not specified, all columns of the database table
            /// are loaded with CSV data.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("columns")]
            public virtual System.Collections.Generic.IList<string> Columns { get; set; } 

            /// <summary>The table to which CSV data is imported.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("table")]
            public virtual string Table { get; set; } 

        }
    }    

    /// <summary>Database instance clone request.</summary>
    public class InstancesCloneRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Contains details about the clone operation.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("cloneContext")]
        public virtual CloneContext CloneContext { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Database instance export request.</summary>
    public class InstancesExportRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Contains details about the export operation.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("exportContext")]
        public virtual ExportContext ExportContext { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Instance failover request.</summary>
    public class InstancesFailoverRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Failover Context.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("failoverContext")]
        public virtual FailoverContext FailoverContext { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Database instance import request.</summary>
    public class InstancesImportRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Contains details about the import operation.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("importContext")]
        public virtual ImportContext ImportContext { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Database instances list response.</summary>
    public class InstancesListResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>List of database instance resources.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<DatabaseInstance> Items { get; set; } 

        /// <summary>This is always sql#instancesList.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The continuation token, used to page through large result sets. Provide this value in a subsequent
        /// request to return the next page of results.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Database instance restore backup request.</summary>
    public class InstancesRestoreBackupRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Parameters required to perform the restore backup operation.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("restoreBackupContext")]
        public virtual RestoreBackupContext RestoreBackupContext { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Instance truncate log request.</summary>
    public class InstancesTruncateLogRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Contains details about the truncate log operation.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("truncateLogContext")]
        public virtual TruncateLogContext TruncateLogContext { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>IP Management configuration.</summary>
    public class IpConfiguration : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The list of external networks that are allowed to connect to the instance using the IP. In CIDR
        /// notation, also known as 'slash' notation (e.g. 192.168.100.0/24).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("authorizedNetworks")]
        public virtual System.Collections.Generic.IList<AclEntry> AuthorizedNetworks { get; set; } 

        /// <summary>Whether the instance should be assigned an IP address or not.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("ipv4Enabled")]
        public virtual System.Nullable<bool> Ipv4Enabled { get; set; } 

        /// <summary>Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("requireSsl")]
        public virtual System.Nullable<bool> RequireSsl { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Database instance IP Mapping.</summary>
    public class IpMapping : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The IP address assigned.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("ipAddress")]
        public virtual string IpAddress { get; set; } 

        /// <summary>The due time for this IP to be retired in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
        /// This field is only available when the IP is scheduled to be retired.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("timeToRetire")]
        public virtual string TimeToRetireRaw { get; set; }

        /// <summary><seealso cref="System.DateTime"/> representation of <see cref="TimeToRetireRaw"/>.</summary>
        [Newtonsoft.Json.JsonIgnore]
        public virtual System.Nullable<System.DateTime> TimeToRetire
        {
            get
            {
                return Google.Apis.Util.Utilities.GetDateTimeFromString(TimeToRetireRaw);
            }
            set
            {
                TimeToRetireRaw = Google.Apis.Util.Utilities.GetStringFromDateTime(value);
            }
        }

        /// <summary>The type of this IP address. A PRIMARY address is an address that can accept incoming connections.
        /// An OUTGOING address is the source address of connections originating from the instance, if
        /// supported.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>User defined labels for Cloud SQL instances.</summary>
    public class Labels : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The key of the label.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("key")]
        public virtual string Key { get; set; } 

        /// <summary>The value of the label.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("value")]
        public virtual string Value { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Preferred location. This specifies where a Cloud SQL instance should preferably be located, either in a
    /// specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location
    /// is not available, the instance will be located as close as possible within the region. Only one location may be
    /// specified.</summary>
    public class LocationPreference : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The AppEngine application to follow, it must be in the same region as the Cloud SQL
        /// instance.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("followGaeApplication")]
        public virtual string FollowGaeApplication { get; set; } 

        /// <summary>This is always sql#locationPreference.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("zone")]
        public virtual string Zone { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Maintenance window. This specifies when a v2 Cloud SQL instance should preferably be restarted for
    /// system maintenance puruposes.</summary>
    public class MaintenanceWindow : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>day of week (1-7), starting on Monday.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("day")]
        public virtual System.Nullable<int> Day { get; set; } 

        /// <summary>hour of day - 0 to 23.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("hour")]
        public virtual System.Nullable<int> Hour { get; set; } 

        /// <summary>This is always sql#maintenanceWindow.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("updateTrack")]
        public virtual string UpdateTrack { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Read-replica configuration specific to MySQL databases.</summary>
    public class MySqlReplicaConfiguration : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>PEM representation of the trusted CA's x509 certificate.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("caCertificate")]
        public virtual string CaCertificate { get; set; } 

        /// <summary>PEM representation of the slave's x509 certificate.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("clientCertificate")]
        public virtual string ClientCertificate { get; set; } 

        /// <summary>PEM representation of the slave's private key. The corresponsing public key is encoded in the
        /// client's certificate.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("clientKey")]
        public virtual string ClientKey { get; set; } 

        /// <summary>Seconds to wait between connect retries. MySQL's default is 60 seconds.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("connectRetryInterval")]
        public virtual System.Nullable<int> ConnectRetryInterval { get; set; } 

        /// <summary>Path to a SQL dump file in Google Cloud Storage from which the slave instance is to be created. The
        /// URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported. Dumps should
        /// have the binlog co-ordinates from which replication should begin. This can be accomplished by setting
        /// --master-data to 1 when using mysqldump.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("dumpFilePath")]
        public virtual string DumpFilePath { get; set; } 

        /// <summary>This is always sql#mysqlReplicaConfiguration.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Interval in milliseconds between replication heartbeats.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("masterHeartbeatPeriod")]
        public virtual System.Nullable<long> MasterHeartbeatPeriod { get; set; } 

        /// <summary>The password for the replication connection.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("password")]
        public virtual string Password { get; set; } 

        /// <summary>A list of permissible ciphers to use for SSL encryption.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("sslCipher")]
        public virtual string SslCipher { get; set; } 

        /// <summary>The username for the replication connection.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("username")]
        public virtual string Username { get; set; } 

        /// <summary>Whether or not to check the master's Common Name value in the certificate that it sends during the
        /// SSL handshake.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("verifyServerCertificate")]
        public virtual System.Nullable<bool> VerifyServerCertificate { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>On-premises instance configuration.</summary>
    public class OnPremisesConfiguration : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The host and port of the on-premises instance in host:port format</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("hostPort")]
        public virtual string HostPort { get; set; } 

        /// <summary>This is always sql#onPremisesConfiguration.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>An Operations resource contains information about database instance operations such as create, delete,
    /// and restart. Operations resources are created in response to operations that were initiated; you never create
    /// them directly.</summary>
    public class Operation : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The time this operation finished in UTC timezone in RFC 3339 format, for example
        /// 2012-11-15T16:19:00.094Z.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("endTime")]
        public virtual string EndTimeRaw { get; set; }

        /// <summary><seealso cref="System.DateTime"/> representation of <see cref="EndTimeRaw"/>.</summary>
        [Newtonsoft.Json.JsonIgnore]
        public virtual System.Nullable<System.DateTime> EndTime
        {
            get
            {
                return Google.Apis.Util.Utilities.GetDateTimeFromString(EndTimeRaw);
            }
            set
            {
                EndTimeRaw = Google.Apis.Util.Utilities.GetStringFromDateTime(value);
            }
        }

        /// <summary>If errors occurred during processing of this operation, this field will be populated.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("error")]
        public virtual OperationErrors Error { get; set; } 

        /// <summary>The context for export operation, if applicable.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("exportContext")]
        public virtual ExportContext ExportContext { get; set; } 

        /// <summary>The context for import operation, if applicable.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("importContext")]
        public virtual ImportContext ImportContext { get; set; } 

        /// <summary>The time this operation was enqueued in UTC timezone in RFC 3339 format, for example
        /// 2012-11-15T16:19:00.094Z.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("insertTime")]
        public virtual string InsertTimeRaw { get; set; }

        /// <summary><seealso cref="System.DateTime"/> representation of <see cref="InsertTimeRaw"/>.</summary>
        [Newtonsoft.Json.JsonIgnore]
        public virtual System.Nullable<System.DateTime> InsertTime
        {
            get
            {
                return Google.Apis.Util.Utilities.GetDateTimeFromString(InsertTimeRaw);
            }
            set
            {
                InsertTimeRaw = Google.Apis.Util.Utilities.GetStringFromDateTime(value);
            }
        }

        /// <summary>This is always sql#operation.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>An identifier that uniquely identifies the operation. You can use this identifier to retrieve the
        /// Operations resource that has information about the operation.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, EXPORT,
        /// BACKUP_VOLUME, RESTORE_VOLUME, CREATE_USER, DELETE_USER, CREATE_DATABASE, DELETE_DATABASE .</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("operationType")]
        public virtual string OperationType { get; set; } 

        /// <summary>The URI of this resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("selfLink")]
        public virtual string SelfLink { get; set; } 

        /// <summary>The time this operation actually started in UTC timezone in RFC 3339 format, for example
        /// 2012-11-15T16:19:00.094Z.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("startTime")]
        public virtual string StartTimeRaw { get; set; }

        /// <summary><seealso cref="System.DateTime"/> representation of <see cref="StartTimeRaw"/>.</summary>
        [Newtonsoft.Json.JsonIgnore]
        public virtual System.Nullable<System.DateTime> StartTime
        {
            get
            {
                return Google.Apis.Util.Utilities.GetDateTimeFromString(StartTimeRaw);
            }
            set
            {
                StartTimeRaw = Google.Apis.Util.Utilities.GetStringFromDateTime(value);
            }
        }

        /// <summary>The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("status")]
        public virtual string Status { get; set; } 

        /// <summary>Name of the database instance related to this operation.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("targetId")]
        public virtual string TargetId { get; set; } 

        /// <summary>The URI of the instance related to the operation.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("targetLink")]
        public virtual string TargetLink { get; set; } 

        /// <summary>The project ID of the target instance related to this operation.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("targetProject")]
        public virtual string TargetProject { get; set; } 

        /// <summary>The email address of the user who initiated this operation.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("user")]
        public virtual string User { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Database instance operation error.</summary>
    public class OperationError : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Identifies the specific error that occurred.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("code")]
        public virtual string Code { get; set; } 

        /// <summary>This is always sql#operationError.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Additional information about the error encountered.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("message")]
        public virtual string Message { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Database instance operation errors list wrapper.</summary>
    public class OperationErrors : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The list of errors encountered while processing this operation.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("errors")]
        public virtual System.Collections.Generic.IList<OperationError> Errors { get; set; } 

        /// <summary>This is always sql#operationErrors.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Database instance list operations response.</summary>
    public class OperationsListResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>List of operation resources.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<Operation> Items { get; set; } 

        /// <summary>This is always sql#operationsList.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The continuation token, used to page through large result sets. Provide this value in a subsequent
        /// request to return the next page of results.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Read-replica configuration for connecting to the master.</summary>
    public class ReplicaConfiguration : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Specifies if the replica is the failover target. If the field is set to true the replica will be
        /// designated as a failover replica. In case the master instance fails, the replica instance will be promoted
        /// as the new master instance. Only one replica can be specified as failover target, and the replica has to be
        /// in different zone with the master instance.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("failoverTarget")]
        public virtual System.Nullable<bool> FailoverTarget { get; set; } 

        /// <summary>This is always sql#replicaConfiguration.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>MySQL specific configuration when replicating from a MySQL on-premises master. Replication
        /// configuration information such as the username, password, certificates, and keys are not stored in the
        /// instance metadata. The configuration information is used only to set up the replication connection and is
        /// stored by MySQL in a file named master.info in the data directory.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("mysqlReplicaConfiguration")]
        public virtual MySqlReplicaConfiguration MysqlReplicaConfiguration { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Database instance restore from backup context.</summary>
    public class RestoreBackupContext : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The ID of the backup run to restore from.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("backupRunId")]
        public virtual System.Nullable<long> BackupRunId { get; set; } 

        /// <summary>The ID of the instance that the backup was taken from.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("instanceId")]
        public virtual string InstanceId { get; set; } 

        /// <summary>This is always sql#restoreBackupContext.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Database instance settings.</summary>
    public class Settings : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The activation policy specifies when the instance is activated; it is applicable only when the
        /// instance state is RUNNABLE. The activation policy cannot be updated together with other settings for Second
        /// Generation instances. Valid values: ALWAYS: The instance is on; it is not deactivated by inactivity. NEVER:
        /// The instance is off; it is not activated, even if a connection request arrives. ON_DEMAND: The instance
        /// responds to incoming requests, and turns itself off when not in use. Instances with PER_USE pricing turn off
        /// after 15 minutes of inactivity. Instances with PER_PACKAGE pricing turn off after 12 hours of
        /// inactivity.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("activationPolicy")]
        public virtual string ActivationPolicy { get; set; } 

        /// <summary>The App Engine app IDs that can access this instance. This property is only applicable to First
        /// Generation instances.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("authorizedGaeApplications")]
        public virtual System.Collections.Generic.IList<string> AuthorizedGaeApplications { get; set; } 

        /// <summary>Reserved for future use.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("availabilityType")]
        public virtual string AvailabilityType { get; set; } 

        /// <summary>The daily backup configuration for the instance.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("backupConfiguration")]
        public virtual BackupConfiguration BackupConfiguration { get; set; } 

        /// <summary>Configuration specific to read replica instances. Indicates whether database flags for crash-safe
        /// replication are enabled. This property is only applicable to First Generation instances.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("crashSafeReplicationEnabled")]
        public virtual System.Nullable<bool> CrashSafeReplicationEnabled { get; set; } 

        /// <summary>The size of data disk, in GB. The data disk size minimum is 10GB. Applies only to Second Generation
        /// instances.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("dataDiskSizeGb")]
        public virtual System.Nullable<long> DataDiskSizeGb { get; set; } 

        /// <summary>The type of data disk. Only supported for Second Generation instances. The default type is PD_SSD.
        /// Applies only to Second Generation instances.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("dataDiskType")]
        public virtual string DataDiskType { get; set; } 

        /// <summary>The database flags passed to the instance at startup.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("databaseFlags")]
        public virtual System.Collections.Generic.IList<DatabaseFlags> DatabaseFlags { get; set; } 

        /// <summary>Configuration specific to read replica instances. Indicates whether replication is enabled or
        /// not.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("databaseReplicationEnabled")]
        public virtual System.Nullable<bool> DatabaseReplicationEnabled { get; set; } 

        /// <summary>The settings for IP Management. This allows to enable or disable the instance IP and manage which
        /// external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation
        /// instances.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("ipConfiguration")]
        public virtual IpConfiguration IpConfiguration { get; set; } 

        /// <summary>This is always sql#settings.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>User defined labels.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("labels")]
        public virtual System.Collections.Generic.IList<Labels> Labels { get; set; } 

        /// <summary>The location preference settings. This allows the instance to be located as near as possible to
        /// either an App Engine app or GCE zone for better performance. App Engine co-location is only applicable to
        /// First Generation instances.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("locationPreference")]
        public virtual LocationPreference LocationPreference { get; set; } 

        /// <summary>The maintenance window for this instance. This specifies when the instance may be restarted for
        /// maintenance purposes. Applies only to Second Generation instances.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("maintenanceWindow")]
        public virtual MaintenanceWindow MaintenanceWindow { get; set; } 

        /// <summary>The pricing plan for this instance. This can be either PER_USE or PACKAGE. Only PER_USE is
        /// supported for Second Generation instances.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("pricingPlan")]
        public virtual string PricingPlan { get; set; } 

        /// <summary>The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS. This
        /// property is only applicable to First Generation instances.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("replicationType")]
        public virtual string ReplicationType { get; set; } 

        /// <summary>The version of instance settings. This is a required field for update method to make sure
        /// concurrent updates are handled properly. During update, use the most recent settingsVersion value for this
        /// instance and do not try to update this value.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("settingsVersion")]
        public virtual System.Nullable<long> SettingsVersion { get; set; } 

        /// <summary>Configuration to increase storage size automatically. The default value is false. Applies only to
        /// Second Generation instances.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("storageAutoResize")]
        public virtual System.Nullable<bool> StorageAutoResize { get; set; } 

        /// <summary>The maximum size to which storage capacity can be automatically increased. The default value is 0,
        /// which specifies that there is no limit. Applies only to Second Generation instances.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("storageAutoResizeLimit")]
        public virtual System.Nullable<long> StorageAutoResizeLimit { get; set; } 

        /// <summary>The tier of service for this instance, for example D1, D2. For more information, see
        /// pricing.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("tier")]
        public virtual string Tier { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>SslCerts Resource</summary>
    public class SslCert : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>PEM representation.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("cert")]
        public virtual string Cert { get; set; } 

        /// <summary>Serial number, as extracted from the certificate.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("certSerialNumber")]
        public virtual string CertSerialNumber { get; set; } 

        /// <summary>User supplied name. Constrained to [a-zA-Z.-_ ]+.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("commonName")]
        public virtual string CommonName { get; set; } 

        /// <summary>The time when the certificate was created in RFC 3339 format, for example
        /// 2012-11-15T16:19:00.094Z</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("createTime")]
        public virtual string CreateTimeRaw { get; set; }

        /// <summary><seealso cref="System.DateTime"/> representation of <see cref="CreateTimeRaw"/>.</summary>
        [Newtonsoft.Json.JsonIgnore]
        public virtual System.Nullable<System.DateTime> CreateTime
        {
            get
            {
                return Google.Apis.Util.Utilities.GetDateTimeFromString(CreateTimeRaw);
            }
            set
            {
                CreateTimeRaw = Google.Apis.Util.Utilities.GetStringFromDateTime(value);
            }
        }

        /// <summary>The time when the certificate expires in RFC 3339 format, for example
        /// 2012-11-15T16:19:00.094Z.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("expirationTime")]
        public virtual string ExpirationTimeRaw { get; set; }

        /// <summary><seealso cref="System.DateTime"/> representation of <see cref="ExpirationTimeRaw"/>.</summary>
        [Newtonsoft.Json.JsonIgnore]
        public virtual System.Nullable<System.DateTime> ExpirationTime
        {
            get
            {
                return Google.Apis.Util.Utilities.GetDateTimeFromString(ExpirationTimeRaw);
            }
            set
            {
                ExpirationTimeRaw = Google.Apis.Util.Utilities.GetStringFromDateTime(value);
            }
        }

        /// <summary>Name of the database instance.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("instance")]
        public virtual string Instance { get; set; } 

        /// <summary>This is always sql#sslCert.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The URI of this resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("selfLink")]
        public virtual string SelfLink { get; set; } 

        /// <summary>Sha1 Fingerprint.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("sha1Fingerprint")]
        public virtual string Sha1Fingerprint { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>SslCertDetail.</summary>
    public class SslCertDetail : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The public information about the cert.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("certInfo")]
        public virtual SslCert CertInfo { get; set; } 

        /// <summary>The private key for the client cert, in pem format. Keep private in order to protect your
        /// security.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("certPrivateKey")]
        public virtual string CertPrivateKey { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>SslCerts create ephemeral certificate request.</summary>
    public class SslCertsCreateEphemeralRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>PEM encoded public key to include in the signed certificate.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("public_key")]
        public virtual string PublicKey { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>SslCerts insert request.</summary>
    public class SslCertsInsertRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>User supplied name. Must be a distinct name from the other certificates for this instance. New
        /// certificates will not be usable until the instance is restarted.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("commonName")]
        public virtual string CommonName { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>SslCert insert response.</summary>
    public class SslCertsInsertResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The new client certificate and private key. The new certificate will not work until the instance is
        /// restarted for First Generation instances.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("clientCert")]
        public virtual SslCertDetail ClientCert { get; set; } 

        /// <summary>This is always sql#sslCertsInsert.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The operation to track the ssl certs insert request.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("operation")]
        public virtual Operation Operation { get; set; } 

        /// <summary>The server Certificate Authority's certificate. If this is missing you can force a new one to be
        /// generated by calling resetSslConfig method on instances resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("serverCaCert")]
        public virtual SslCert ServerCaCert { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>SslCerts list response.</summary>
    public class SslCertsListResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>List of client certificates for the instance.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<SslCert> Items { get; set; } 

        /// <summary>This is always sql#sslCertsList.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>A Google Cloud SQL service tier resource.</summary>
    public class Tier : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The maximum disk size of this tier in bytes.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("DiskQuota")]
        public virtual System.Nullable<long> DiskQuota { get; set; } 

        /// <summary>The maximum RAM usage of this tier in bytes.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("RAM")]
        public virtual System.Nullable<long> RAM { get; set; } 

        /// <summary>This is always sql#tier.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The applicable regions for this tier.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("region")]
        public virtual System.Collections.Generic.IList<string> Region { get; set; } 

        /// <summary>An identifier for the service tier, for example D1, D2 etc. For related information, see
        /// Pricing.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("tier")]
        public virtual string TierValue { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Tiers list response.</summary>
    public class TiersListResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>List of tiers.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<Tier> Items { get; set; } 

        /// <summary>This is always sql#tiersList.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Database Instance truncate log context.</summary>
    public class TruncateLogContext : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>This is always sql#truncateLogContext.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The type of log to truncate. Valid values are MYSQL_GENERAL_TABLE and MYSQL_SLOW_TABLE.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("logType")]
        public virtual string LogType { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>A Cloud SQL user resource.</summary>
    public class User : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>HTTP 1.1 Entity tag for the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>The host name from which the user can connect. For insert operations, host defaults to an empty
        /// string. For update operations, host is specified as part of the request URL. The host name cannot be updated
        /// after insertion.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("host")]
        public virtual string Host { get; set; } 

        /// <summary>The name of the Cloud SQL instance. This does not include the project ID. Can be omitted for update
        /// since it is already specified on the URL.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("instance")]
        public virtual string Instance { get; set; } 

        /// <summary>This is always sql#user.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The name of the user in the Cloud SQL instance. Can be omitted for update since it is already
        /// specified on the URL.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>The password for the user.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("password")]
        public virtual string Password { get; set; } 

        /// <summary>The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed
        /// if applicable. Can be omitted for update since it is already specified on the URL.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("project")]
        public virtual string Project { get; set; } 

    }    

    /// <summary>User list response.</summary>
    public class UsersListResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>List of user resources in the instance.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<User> Items { get; set; } 

        /// <summary>This is always sql#usersList.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>An identifier that uniquely identifies the operation. You can use this identifier to retrieve the
        /// Operations resource that has information about the operation.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }
}
